package com.olda.play.login.service;

import com.olda.play.login.vo.WechatUserVo;
import com.olda.play.model.UserDetailInfo;
import com.olda.play.rpc.CommonResponseDto;
import org.springframework.web.bind.annotation.RequestParam;

import java.security.Principal;
import java.util.Map;

/**
 */
public interface LoginService {

    /**
     * 测试rpclogin接口
     * @return
     */
    CommonResponseDto<String> testLogin() ;

    /**
     * 根据用户名获取用户信息
     * @param username
     * @return
     */
    CommonResponseDto<UserDetailInfo> getUserDetailInfoByUserName(String username) ;

    /**
     * 根据openid查询用户信息
     * @param openid
     * @return
     */
    CommonResponseDto<UserDetailInfo> loadUserByOpenId(String openid);

    void addWechatUser(WechatUserVo wechatUserVo);

    Object postAccessToken(
            Principal principal,
             @RequestParam Map<String, String> parameters
    );
}
